import os
import time
import re


audiopath='e:\\sanyo\\'

files = os.listdir(audiopath)

regex = re.compile(r'SANY[0-9]{4}.MP4')

for filename in files:
    if regex.match(filename) != None:
        audiofile=audiopath+filename
        ft = time.localtime(os.path.getmtime(audiofile))
        new_filename = audiopath+'SANYO_'+time.strftime("%Y%m%d_%H%M%S", ft)+'.MP4'
        print audiofile, '==>', new_filename
        os.rename(audiofile, new_filename)
